package com.person.android.jni;

import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.util.Log;

import com.person.android.utils.LogUtils;
import com.person.android.utils.TransformStatus;

public class AudioTransformJNI {

	public Handler mHandler;

	public AudioTransformJNI(Handler handler) {
		this.mHandler = handler;
	}

	static {
		System.loadLibrary("v2audio-transform");
	}

	public native int mp3TransformWav(String mp3, String wav);

	public void setConvertProgress(int progress){
		LogUtils.logInfo(LogUtils.FileListActivityFlag, "setConvertProgress progress:=" + progress);
		Message msg = new Message();
		msg.what = TransformStatus.TRANSFORMING_PROGRESS;
		Bundle data = new Bundle();
		data.putInt("progress", progress);
		msg.setData(data);
		mHandler.sendMessage(msg);
	}

}
